const http = uni.$u.http

// post请求，获取菜单
// export const postMenu = (params, config = {}) => http.post('/api/orders', params, config)

// get请求，获取菜单，注意：get请求的配置等，都在第二个参数中，详见前面解释
// uni.$u.http.get('/user/login', {params: {userName: 'name', password: '123456'}}))
//轮首页播图
export const getSwiper = () => http.get('/api/public/v1/home/swiperdata')

//首页导航
export const getNav = () => http.get('/api/public/v1/home/catitems')

//首页floor数据
export const getFloor = () => http.get('/api/public/v1/home/floordata')

//获取分类数据
export const getCate = () => http.get('/api/public/v1/categories')

//获取搜索
export const getSearch = (keyWord) => http.get('/api/public/v1/goods/qsearch', {params:{query:keyWord}})

//获取商品列表
export const getGoods = (obj) => http.get('/api/public/v1/goods/search', {params: obj})

// 获取商品详情
export const getGoodsDetail = (id) => http.get('api/public/v1/goods/detail', {params: {goods_id: id}})

// 获取微信登录
export const getWeChat = (params) => http.post('/api/public/v1/users/wxlogin', params)